package com.es.pay.ctmPay;

import java.util.Calendar;

import javax.servlet.http.HttpServletRequest;

import com.opensymphony.webwork.interceptor.ServletRequestAware;
import com.opensymphony.xwork.ActionSupport;

public class CreateCtmPayInitAction extends ActionSupport implements ServletRequestAware{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	HttpServletRequest request;
	 
	   public String execute()throws Exception
	   {
		   CtmPayBiz biz = new CtmPayBiz();
		   biz.initCtmExam();
		   Calendar rightNow = Calendar.getInstance();
		   request.setAttribute("ctmNum", biz.countCtmNum());
		   request.setAttribute("yyyy_mm",rightNow.get(Calendar.YEAR) +"-"+((rightNow.get(Calendar.MONTH)+1)>9?(rightNow.get(Calendar.MONTH)+1):"0"+(rightNow.get(Calendar.MONTH)+1)));
		   return "success";
	   }
	
	   public void setServletRequest(HttpServletRequest request) {
		     this.request = request;
		   }
}

